# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(native)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}/napi/include
                    ${NATIVERENDER_ROOT_PATH}/gl/include
                    ${NATIVERENDER_ROOT_PATH}/util/include
                    ${NATIVERENDER_ROOT_PATH}/filter/include
                    )


# 收集指定路径下的所有cpp文件
file(GLOB_RECURSE ALL_CPP_SOURCES
     "${NATIVERENDER_ROOT_PATH}/napi/src/*.cpp"
     "${NATIVERENDER_ROOT_PATH}/filter/src/*.cpp"
     "${NATIVERENDER_ROOT_PATH}/util/src/*.cpp"
     "${NATIVERENDER_ROOT_PATH}/gl/src/*.cpp"
     )

add_library(gpuimagenative
            # Sets the library as a shared library.
            SHARED
            ${ALL_CPP_SOURCES}
            )

target_link_libraries(gpuimagenative PUBLIC
            ace_napi.z
            hilog_ndk.z
            GLESv3
            pixelmap_ndk.z
            EGL
            image_ndk.z
            native_image
            uv
            native_window
            native_buffer
            ace_ndk.z
            native_vsync
            )